<template>
  <div class="achievements-section">
    <h3>宇宙成就</h3>
    <div class="achievements-list">
      <div 
        v-for="(achievement, index) in achievements" 
        :key="index" 
        class="achievement-item"
        :class="{ 'unlocked': achievement.unlocked }"
      >
        <div class="achievement-icon">{{ achievement.icon }}</div>
        <div class="achievement-info">
          <div class="achievement-name">{{ achievement.name }}</div>
          <div class="achievement-desc">{{ achievement.description }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      achievements: [
        {
          icon: '🔭',
          name: '宇宙探索者',
          description: '完成首次平行宇宙反转',
          unlocked: true
        },
        {
          icon: '🚀',
          name: '宇宙旅行家',
          description: '完成10次平行宇宙反转',
          unlocked: false
        },
        {
          icon: '🌠',
          name: '宇宙大师',
          description: '获得一次90%以上可信度的反转',
          unlocked: false
        }
      ]
    }
  }
}
</script>

<style scoped>
.achievements-section {
  margin-top: 30px;
  padding: 15px;
  background-color: rgba(255, 255, 255, 0.7);
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.achievements-section h3 {
  text-align: center;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.achievement-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  background-color: #f5f5f5;
  opacity: 0.7;
  transition: all 0.3s ease;
}

.achievement-item.unlocked {
  background-color: #E8F5E9;
  opacity: 1;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.achievement-icon {
  font-size: 1.8em;
  margin-right: 15px;
}

.achievement-name {
  font-weight: bold;
  margin-bottom: 3px;
}

.achievement-desc {
  font-size: 0.9em;
  color: #757575;
}
</style>